> library(cocor)
Warning message:
package ‘cocor’ was built under R version 3.6.3 
> suicide
 [1] 23.8 37.5 37.0 20.7 10.6 14.2 45.6 31.9 24.3 31.9 16.0 16.8 64.8 47.3 21.9
[16] 16.5 32.4 24.1 32.7 30.8 34.2 34.5 24.4 29.4 14.4 41.7 19.2 24.9 17.9 15.7
[31] 36.0 24.4 42.2 38.2 20.3 47.6
> prestige
 [1] 82 90 76 90 87 93 90 88 89 97 59 73 81 45 39 34 41 16 33 53 67 57 26 29 10
[26] 15 19 10 13 24 20  7 16 11  8 41
> educatio
 [1] 14.4 16.0 15.6 16.0 16.0 16.0 16.0 16.0 16.0 16.0 15.8 16.0 12.2 11.6 12.7
[16] 12.2 12.7 12.1  8.7 11.1  8.8  9.6  9.4  9.3 10.3  8.2  9.2  8.9  9.6  9.6
[31]  8.8  9.8  8.7  8.5  8.2 10.6
> site
 [1] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

> cocor(~suicide + prestige | suicide + educatio, x1)

  Results of a comparison of two overlapping correlations based on dependent groups

Comparison between r.jk (suicide, prestige) = 0.1087 and r.jh (suicide, educatio) = -0.1491
Difference: r.jk - r.jh = 0.2578
Related correlation: r.kh = 0.8597
Data: x1: j = suicide, k = prestige, h = educatio
Group size: n = 36
Null hypothesis: r.jk is equal to r.jh
Alternative hypothesis: r.jk is not equal to r.jh (two-sided)
Alpha: 0.05

pearson1898: Pearson and Filon's z (1898)
  z = 2.9874, p-value = 0.0028
  Null hypothesis rejected

hotelling1940: Hotelling's t (1940)
  t = 3.2006, df = 33, p-value = 0.0030
  Null hypothesis rejected

williams1959: Williams' t (1959)
  t = 3.2006, df = 33, p-value = 0.0030
  Null hypothesis rejected

olkin1967: Olkin's z (1967)
  z = 2.9874, p-value = 0.0028
  Null hypothesis rejected

dunn1969: Dunn and Clark's z (1969)
  z = 2.8290, p-value = 0.0047
  Null hypothesis rejected

hendrickson1970: Hendrickson, Stanley, and Hills' (1970) modification of Williams' t (1959)
  t = 3.2006, df = 33, p-value = 0.0030
  Null hypothesis rejected

